<%@ Page Language="VB" MasterPageFile="~/AdminMasterPage.master" AutoEventWireup="false" 
CodeFile="AR_No.aspx.vb" Inherits="Admin_AR_No" title="CIMS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:SqlDataSource ID="sdsARType" runat="server" ConnectionString="<%$ ConnectionStrings:sqlCnnString %>"
        ProviderName="<%$ ConnectionStrings:sqlCnnString.ProviderName %>" SelectCommand="SELECT * FROM [ar_type_mstr]"
        UpdateCommand="sp_ar_type_mstr_upd;1" UpdateCommandType="StoredProcedure">
        <UpdateParameters>
            <asp:Parameter Name="ar_type_seq_cd" Type="String" />
            <asp:Parameter Name="ar_type_desc" Type="String" />
            <asp:Parameter Name="ar_type_start_no" Type="Int32" />
            <asp:Parameter Name="ar_type_curr_no" Type="Int32" />
            <asp:Parameter Name="ar_type_last_upd_by" Type="String" />
            <asp:Parameter Name="ar_type_last_upd_dt" Type="DateTime" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <br />
    <table cellpadding="0" cellspacing="0">
        <tr><td style="width: 580px;">
            <asp:GridView ID="DataGrid" runat="server" AutoGenerateColumns="False" BackColor="White"
                BorderColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="1" Font-Names="Verdana" Width="580px" Font-Size="Small" TabIndex="12" AllowPaging="True" DataKeyNames="ar_type_seq_cd" DataSourceID="sdsARType">
                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                <PagerStyle BackColor="White" ForeColor="#330099" HorizontalAlign="Left" />
                <AlternatingRowStyle BackColor="#D7DADF" />
                <RowStyle BackColor="#F2F3F5" ForeColor="Black" />
                <HeaderStyle BackColor="#105BA4" Font-Bold="True" ForeColor="White" />
                <PagerSettings Position="Top" />
                <Columns>
                    <asp:TemplateField HeaderText="AR Type" SortExpression="ar_type_desc">
                        <EditItemTemplate>
                            <asp:Label ID="lblARType" runat="server" Text='<%# Eval("ar_type_desc") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("ar_type_desc") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Start No" SortExpression="ar_type_start_no">
                        <EditItemTemplate>
                            <asp:Label ID="lblID" runat="server" Text='<%# Bind("ar_type_seq_cd") %>' Visible="False"></asp:Label>
                            <asp:TextBox ID="txtStartNo" runat="server" Text='<%# Bind("ar_type_start_no") %>'
                                Width="50px"></asp:TextBox>
                            <ajaxToolkit:FilteredTextBoxExtender ID="ftbStartNo" runat="server" FilterType="Numbers"
                                TargetControlID="txtStartNo">
                            </ajaxToolkit:FilteredTextBoxExtender>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("ar_type_start_no") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Current No" SortExpression="ar_type_curr_no">
                        <EditItemTemplate>
                            <asp:Label ID="lblCurrNo" runat="server" Text='<%# Eval("ar_type_curr_no") %>'></asp:Label>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("ar_type_curr_no") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Right" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="cmdUpdate"
                                Text="Update"></asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="Back"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
                                Text="Edit"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                
            </asp:GridView>
            &nbsp;&nbsp;
        </td></tr>
    </table> 
</asp:Content>